{include file="header.html"}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
${
    demo.css
}
 </style>
<script type="text/javascript">
$(function(){
    $('#dtyear').datepicker({
        just:'year',format:'yyyy'
    });
    $('#dtmonth').datepicker({
        just:'month',format:'mm'
    });
})
// $(function () {
//     $('#container').highcharts({
//         chart: {
//             type: 'column'
//         },
//         title: {
//             text: '已支付订单数'
//         },
//         subtitle: {
//             text: '（当天订单总金额）'
//         },
//         xAxis: {
//             categories: [
//                 {$days}
//             ]
//         },
//         yAxis: {
//             min: 0,
//             title: {
//                 text: 'quantity'
//             }
//         },

//         plotOptions: {
//             column: {
//                 pointPadding: 0.2,
//                 borderWidth: 0
//             }
//         },
//         series: [{
//             name: '当天订单数',
//             data: [{$rs}]
//         },{
//             name: '当天订单总金额',
//             data: [{$total_price}]
//         }]
//     });
// });
$(function () {
    $('#container').highcharts({
        chart: {
            zoomType: 'xy'
        },
        title: {
            text: '订单数'
        },
        subtitle: {
            text: '总价'
        },
        xAxis: [{
            categories: [{$days}]
        }],
        yAxis: [{ // Primary yAxis
            labels: {
                format: '',
                style: {
                    color: '#89A54E'
                }
            },
            title: {
                text: '总价',
                style: {
                    color: '#89A54E'
                }
            }
        }, { // Secondary yAxis
            title: {
                text: '订单数',
                style: {
                    color: '#4572A7'
                }
            },
            labels: {
                format: '',
                style: {
                    color: '#4572A7'
                }
            },
            opposite: true
        }],
        tooltip: {
            shared: true
        },
        legend: {
            layout: 'vertical',
            align: 'left',
            x: 120,
            verticalAlign: 'top',
            y: 100,
            floating: true,
            backgroundColor: '#FFFFFF'
        },
        series: [
        {
            name: '总价',
            color: '#89A54E',
            yAxis: 1,
            type: 'column',
            data: [{$total_price}],
            tooltip: {
                valueSuffix: '元'
            }
        },{
            name: '订单数',
            color: '#4572A7',
            type: 'spline',
            data: [{$rs}],
            tooltip: {
                valueSuffix: ' 单'
            }

        } ]
    });
});
</script>
<div class="page-header">
	<h6>
		统计报表
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			报表
		</small>

	</h6>
    <form class="form-inline" action="?app=statistics&act=order" method="get" style="padding-bottom:5px;">
        <input type="hidden" name="app" id="app" value="statistics" />
        <input type="hidden" name="act" id="act" value="order" />
        <span>选择年份：<input type="text" name="year" id="dtyear" value="{$year}" /></span>
        <span>选择月份：<input type="text" name="month" id="dtmonth" value="{$month}" /></span>
        <button type="submit" class="btn btn-info btn-sm">
         <i class="ace-icon fa fa-search bigger-110"></i>搜索
        </button>
</form>

</div><!-- /.page-header -->
<script src="../framework/third/highcharts-4.0.4/js/highcharts.js"></script>
<script src="../framework/third/highcharts-4.0.4/js/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>



{include file="footer.html"}


